package com.atguigu01._this;

/**
 * ClassName: PersonTest
 * Package: com.atguigu01._this
 * Description:
 *
 * @Author ZY
 * @Create 22:26
 * @Version 1.0
 */
public class PersonTest {
    public static void main(String[] args) {
        Person person = new Person("张三",20,"123@qq.com");

        System.out.println(person.toString());
    }
}
class Person{
    String name;
    int age;
    String email;

    public Person(String name,int age,String email){
        this.name = name;
        this.age = age;
        this.email = email;
    }

    public void setName(String name){
        this.name = name;
    }

    public String getName(){
        return name;
    }

    public void setAge(int age){
        this.age = age;
    }

    public int getAge(){
        return age;
    }

    public void setEmail(String email){
        this.email = email;
    }

    public String getEmail(){
        return email;
    }

    public String toString(){
        return "Person[name="+name+",age="+age+",email="+email+"]";
    }
}
